//package com.health.viewscontrols.tjbg;
//
//import android.content.Intent;
//import android.graphics.Bitmap;
//import android.graphics.BitmapFactory;
//import android.graphics.Canvas;
//import android.graphics.Color;
//import android.net.Uri;
//import android.os.Bundle;
//import android.os.Handler;
//import android.provider.MediaStore;
//import android.support.annotation.Nullable;
//import android.support.v7.widget.GridLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.text.TextUtils;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.webkit.WebChromeClient;
//import android.webkit.WebSettings;
//import android.webkit.WebView;
//import android.webkit.WebViewClient;
//import android.widget.ImageView;
//import android.widget.LinearLayout;
//import android.widget.TextView;
//
//import com.blankj.utilcode.util.GsonUtils;
//import com.blankj.utilcode.util.ImageUtils;
//import com.blankj.utilcode.util.SPStaticUtils;
//import com.blankj.utilcode.util.TimeUtils;
//import com.blankj.utilcode.util.ToastUtils;
//import com.chad.library.adapter.base.BaseQuickAdapter;
//import com.google.zxing.BarcodeFormat;
//import com.google.zxing.EncodeHintType;
//import com.google.zxing.WriterException;
//import com.google.zxing.common.BitMatrix;
//import com.google.zxing.qrcode.QRCodeWriter;
//import com.health.R;
//import com.health.db.FDbManager;
//import com.health.httpbean.HttpNewConstant;
//import com.health.httpbean.model.BpModel;
//import com.health.httpbean.model.EcgModel;
//import com.health.httpbean.model.PoModel;
//import com.health.httpbean.model.UeModel;
//import com.health.tablebean.ARCHIVE_BASEINFO;
//import com.health.tablebean.BD_DD_INFO;
//import com.health.tablebean.SBCL_DATA_NEW;
//import com.health.tools.GlobalConts;
//import com.health.viewscontrols.NovaApplication;
//import com.health.viewscontrols.medical.base.DeviceConstant;
//import com.health.viewscontrols.medical.base.DeviceEnum;
//import com.health.viewscontrols.tjbg.base.NovaPtActivity;
//
//import java.io.File;
//import java.util.Date;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import butterknife.BindView;
//
//public class TjbgNewActivity extends NovaPtActivity {
//
//    @BindView(R.id.iv_back)
//    ImageView ivBack;
//    @BindView(R.id.tv_title)
//    TextView tvTitle;
//    @BindView(R.id.tv_title_time)
//    TextView tvTitleTime;
//    @BindView(R.id.iv_photo)
//    ImageView ivPhoto;
//    @BindView(R.id.tv_name)
//    TextView tvName;
//    @BindView(R.id.tv_sex)
//    TextView tvSex;
//    @BindView(R.id.tv_age)
//    TextView tvAge;
//    @BindView(R.id.tv_birthday)
//    TextView tvBirthday;
//    @BindView(R.id.tv_address)
//    TextView tvAddress;
//    @BindView(R.id.tv_phone)
//    TextView tv_phone;
//    @BindView(R.id.rv_tj_data_list)
//    RecyclerView rvTjDataList;
//    @BindView(R.id.kanghuaixuesuan)
//    TextView kanghuaixuesuan;
//    @BindView(R.id.tv_yinxue)
//    TextView tvYinxue;
//    @BindView(R.id.tv_tongti)
//    TextView tvTongti;
//    @BindView(R.id.tv_baixibao)
//    TextView tvBaixibao;
//    @BindView(R.id.tv_yaxiaosuanyan)
//    TextView tvYaxiaosuanyan;
//    @BindView(R.id.tv_niaodanyuan)
//    TextView tvNiaodanyuan;
//    @BindView(R.id.tv_dbz)
//    TextView tvDbz;
//    @BindView(R.id.tv_danhongsu)
//    TextView tvDanhongsu;
//    @BindView(R.id.tv_putaotang)
//    TextView tvPutaotang;
//    @BindView(R.id.tv_bizhong)
//    TextView tvBizhong;
//    @BindView(R.id.tv_ph)
//    TextView tvPh;
//    @BindView(R.id.ll_ue)
//    LinearLayout ll_ue;
//    @BindView(R.id.tv_time_ue)
//    TextView tv_time_ue;
//    @BindView(R.id.tv_time_vision)
//    TextView tvTimeVision;
//    @BindView(R.id.tv_left_sl)
//    TextView tvLeftSl;
//    @BindView(R.id.tv_left_s)
//    TextView tvLeftS;
//    @BindView(R.id.tv_left_c)
//    TextView tvLeftC;
//    @BindView(R.id.tv_left_a)
//    TextView tvLeftA;
//    @BindView(R.id.tv_right_sl)
//    TextView tvRightSl;
//    @BindView(R.id.tv_right_s)
//    TextView tvRightS;
//    @BindView(R.id.tv_right_c)
//    TextView tvRightC;
//    @BindView(R.id.tv_right_a)
//    TextView tvRightA;
//    @BindView(R.id.ll_vision)
//    LinearLayout llVision;
//    @BindView(R.id.tv_time_rtcf)
//    TextView tvTimeRtcf;
//    @BindView(R.id.tv_rtcf_height)
//    TextView tvRtcfHeight;
//    @BindView(R.id.tv_rtcf_weight)
//    TextView tvRtcfWeight;
//    @BindView(R.id.tv_rtcf_bmi)
//    TextView tvRtcfBmi;
//    @BindView(R.id.tv_rtcf_zfl)
//    TextView tvRtcfZfl;
//    @BindView(R.id.tv_rtcf_sfl)
//    TextView tvRtcfSfl;
//    @BindView(R.id.tv_rtcf_jrl)
//    TextView tvRtcfJrl;
//    @BindView(R.id.tv_rtcf_gl)
//    TextView tvRtcfGl;
//    @BindView(R.id.tv_rtcf_jcdx)
//    TextView tvRtcfJcdx;
//    @BindView(R.id.tv_rtcf_nzzfdj)
//    TextView tvRtcfNzzfdj;
//    @BindView(R.id.tv_rtcf_age)
//    TextView tvRtcfAge;
//    @BindView(R.id.tv_rtcf_dbzl)
//    TextView tvRtcfDbzl;
//    @BindView(R.id.tv_rtcf_xbwsfl)
//    TextView tvRtcfXbwsfl;
//    @BindView(R.id.ll_rtcf)
//    LinearLayout llRtcf;
//    @BindView(R.id.ll_print)
//    LinearLayout llPrint;
//    @BindView(R.id.ll_root)
//    LinearLayout llRoot;
//    @BindView(R.id.iv_code)
//    ImageView iv_code;
//    List<TjbgBean> tjData;
//
//    View tjbgView;
//    private TjbgNewAdapter tjbgNewAdapter;
//    private ARCHIVE_BASEINFO userinfo;
//
//    String strWhere = "IDCARD = '" + NovaApplication.getIdCardNew() + "'";
//    List<SBCL_DATA_NEW> visionList;
//    VisionBean visionBean;
//    List<SBCL_DATA_NEW> rtcfList;
//    FmModel fmModel;
//    List<SBCL_DATA_NEW> ueList;
//    UeModel ueModel;
//    String qRCodeUrl;
//    List<SBCL_DATA_NEW> scl90List;
//
//    @Override
//    public void initData(@Nullable Bundle bundle) {
//
//    }
//
//    @Override
//    public int bindLayout() {
//        return R.layout.activity_tjbg_new;
//    }
//
//    @Override
//    public void initView(Bundle savedInstanceState, View contentView) {
//        userinfo = NovaApplication.getUserInfo();
//    }
//
//    @Override
//    public void doBusiness() {
//        ivBack.setOnClickListener(v -> finish());
//        tvTitleTime.setText(TimeUtils.millis2String(new Date().getTime(), "yyyy-MM-dd"));
//        setData();
//        initAdapter();
//        setUeData();
//        setVisionData();
//        setRtcfData();
//
//        initWebView();
//        findTjbgView();
//
////        if (BuildConfig.DEBUG) {
////            CreateTestDataUtil.createTestData();
////        }
//
//        String idCard = "";
//        if (!TextUtils.isEmpty(userinfo.getIDCARD())) {
//            idCard = userinfo.getIDCARD();
//        } else {
//            idCard = userinfo.getPHONE();
//        }
//        String defaultURl1 = SPStaticUtils.getString(HttpNewConstant.sp_url_wxmp, HttpNewConstant.defaultURl1);
////        qRCodeUrl = defaultURl1 + "/pos/JianKangGuanLi.html?type=1&idCard=" + idCard;
//        qRCodeUrl = defaultURl1 + "/pos/healthReport.html?idCard=" + idCard;
//        zxing(qRCodeUrl);
//
//        llPrint.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                showProgressDialog("请稍等，正在生成报告");
//                FileUtils.isPathExist();
//                String filePath = FileUtils.PATH_ROOT
//                        + userinfo.getCUSTOMERNAME()
//                        + "_1"
////                        + TimeUtils.date2String(new Date(),"yyyy-MM-dd HH:mm:ss")
//                        + ".png";
//
//                Bitmap oldBitmap = createBitmap();
//                int width = oldBitmap.getWidth();
//                int height = oldBitmap.getHeight();
//
//                int textSize = 25;
//                String text = "- 第一页 -";
//                int textWidth = text.length() * textSize;
//                float x = (width / 2f) - (textWidth / 2);
//                float y = height - 90f;
//
//                Bitmap bitmap = ImageUtils.addTextWatermark(oldBitmap, text, textSize, Color.BLACK, x, y);
//                ImageUtils.save(bitmap, filePath, Bitmap.CompressFormat.PNG);
//
//                if (scl90List != null && scl90List.size() > 0) {
//                    saveScl90Report();
//                }
//
//                cancelProgressDialog();
//                // 通知相册刷新文件
//                File file = new File(filePath);
//                MediaStore.Images.Media.insertImage(getContentResolver(),
//                        BitmapFactory.decodeFile(file.getAbsolutePath()), file.getName(), null);
//                webview.setVisibility(View.GONE);
//
//                new Handler().postDelayed(new Runnable() {
//                    @Override
//                    public void run() {
//
//                        showTextDialog("保存成功");
//                        webview.setVisibility(View.VISIBLE);
//                    }
//                },500);
//                try {
//                    Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
//                    Uri uri = Uri.fromFile(file);
//                    intent.setData(uri);
//                    sendBroadcast(intent);
//                } catch (Exception e) {
//                    e.printStackTrace();
//                }
//            }
//        });
//    }
//
//    private Bitmap createBitmap() {
//        int densityDpi = getResources().getDisplayMetrics().densityDpi;
//        int width = (int) ((densityDpi / 2.54) * 21);
//        int height = (int) ((densityDpi / 2.54) * 29.7);
//        Log.e("xiaoxin", "createBitmap: " +  width);
//        Log.e("xiaoxin", "createBitmap: " +  height);
////        LayoutInflater inflater = LayoutInflater.from(this);
////        View view = inflater.inflate(R.layout.activity_tjbg_new_test1, null);
//        ImageView imageView = tjbgView.findViewById(R.id.iv_code1);
//        imageView.setImageBitmap(zxing1(qRCodeUrl));
////        int width = 3307;
////        int height = 4677;
//
////        int width = 2480;
////        int height = 3508;
////        int width = 1322;
////        int height = 1870;
////        view.measure(View.MeasureSpec.makeMeasureSpec(595, View.MeasureSpec.EXACTLY),
////                View.MeasureSpec.makeMeasureSpec(842, View.MeasureSpec.EXACTLY));
//
//        tjbgView.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
//                View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
//        tjbgView.layout(0, 0, tjbgView.getMeasuredWidth(), tjbgView.getMeasuredHeight());
//
//        Bitmap bitmap = Bitmap.createBitmap(
//                tjbgView.getMeasuredWidth(),
//                tjbgView.getMeasuredHeight(),
//                Bitmap.Config.ARGB_8888);
//        Canvas canvas = new Canvas(bitmap);
//
//        tjbgView.draw(canvas);
//        return Bitmap.createScaledBitmap(bitmap, width, height, true);
//    }
//
//    private Bitmap zxing1(String name) {
//        int width = 260;
//        int height = 260;
//        QRCodeWriter qrCodeWriter = new QRCodeWriter();
//        Map<EncodeHintType, String> hints = new HashMap<>();
//        hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); //记得要自定义长宽
//        BitMatrix encode = null;
//        try {
//            encode = qrCodeWriter.encode(name, BarcodeFormat.QR_CODE, width, height, hints);
//        } catch (WriterException e) {
//            e.printStackTrace();
//        }
//        int[] colors = new int[width * height];
//        //利用for循环将要表示的信息写出来
//        for (int i = 0; i < width; i++) {
//            for (int j = 0; j < height; j++) {
//                if (encode.get(i, j)) {
//                    colors[i * width + j] = Color.BLACK;
//                } else {
//                    colors[i * width + j] = Color.WHITE;
//                }
//            }
//        }
//
//        return Bitmap.createBitmap(colors, width, height, Bitmap.Config.RGB_565);
//    }
//
//    private void initAdapter() {
//        tjbgNewAdapter = new TjbgNewAdapter(R.layout.item_tjbg_new);
//        rvTjDataList.setNestedScrollingEnabled(false);
//        GridLayoutManager layoutManager = new GridLayoutManager(this, 2);
//        layoutManager.setSmoothScrollbarEnabled(true);
//        layoutManager.setAutoMeasureEnabled(true);
//        rvTjDataList.setLayoutManager(layoutManager);
//        rvTjDataList.setHasFixedSize(true);
//        rvTjDataList.setAdapter(tjbgNewAdapter);
//
//        tjData = CommonUtil.getTjData(strWhere);
//        if (tjData != null) {
//            tjbgNewAdapter.setNewData(tjData);
//        }
//        setListener();
//    }
//
//    private void setListener() {
//        ll_ue.setOnClickListener(v -> {
////            Intent intent = new Intent(TjbgNewActivity.this, ExamHistoryActivity.class);
//            Intent intent = new Intent(TjbgNewActivity.this, UEHistoryActivity.class);
//            intent.putExtra("flag", "恩普生");
//            startActivity(intent);
//        });
//
//        llVision.setOnClickListener(v -> {
//            Intent intent = new Intent(TjbgNewActivity.this, VisionHistoryActivity.class);
//            startActivity(intent);
//        });
//        llRtcf.setOnClickListener(v -> {
//            Intent intent = new Intent(TjbgNewActivity.this, RtcfHistoryActivity.class);
//            startActivity(intent);
//        });
//        tjbgNewAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
//            @Override
//            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
//                TjbgBean tjbgBean = (TjbgBean) adapter.getData().get(position);
//                Intent intent;
//                switch (tjbgBean.getType()) {
//                    case "AH":
//                        intent = new Intent(TjbgNewActivity.this, AHHistoryActivity.class);
//                        break;
//                    case "BF_TC":
//                    case "BF_TG":
//                    case "BF_HDL":
//                    case "BF_LDL":
////                        intent = new Intent(TjbgNewActivity.this, ExamHistoryActivity.class);
//                        intent = new Intent(TjbgNewActivity.this, BFHistoryActivity.class);
//                        intent.putExtra("flag", "PW-01");
////                        intent = new Intent(TjbgNewActivity.this, BF4HistoryActivity.class);
//                        break;
//                    case "BG":
//                        intent = new Intent(TjbgNewActivity.this, BGHistoryActivity.class);
//                        break;
//                    case "BO":
//                        intent = new Intent(TjbgNewActivity.this, BOHistoryActivity.class);
//                        break;
//                    case "BP":
//                        intent = new Intent(TjbgNewActivity.this, BPHistoryActivity.class);
//                        break;
//                    case "ECG":
////                        intent = new Intent(TjbgNewActivity.this, ExamHistoryActivity.class);
//                        intent = new Intent(TjbgNewActivity.this, ECGHistoryActivity.class);
//                        intent.putExtra("flag", "心电");
//                        break;
//                    case "FM":
//                        // newTIZHONGQing
////                        intent = new Intent(TjbgNewActivity.this, ExamHistoryWeightActivity.class);
//                        intent = new Intent(TjbgNewActivity.this, FMHistoryActivity.class);
//                        intent.putExtra("flag", "newTIZHONGQing");
//                        break;
//                    case "UE":
////                        intent = new Intent(TjbgNewActivity.this, ExamHistoryActivity.class);
//                        intent = new Intent(TjbgNewActivity.this, UEHistoryActivity.class);
//                        intent.putExtra("flag", "恩普生");
//                        break;
//                    case DeviceConstant.NS:
//                        intent = new Intent(TjbgNewActivity.this, NsHistoryActivity.class);
//                        break;
//                    case DeviceConstant.DGC:
//                        intent = new Intent(TjbgNewActivity.this, DgcHistoryActivity.class);
//                        break;
//                    case DeviceConstant.XHDB:
//                        intent = new Intent(TjbgNewActivity.this, XHDBHistoryActivity.class);
//                        break;
//                    case DeviceConstant.WAIST:
//                        intent = new Intent(TjbgNewActivity.this, WaistHistoryActivity.class);
//                        break;
//                    case DeviceConstant.ZYTZBS:
//                        intent = new Intent(TjbgNewActivity.this, ZytzbsHistoryActivity.class);
//                        break;
//                    default:
//                        intent = null;
//                        break;
//                }
//
//                if (intent != null) {
//                    startActivity(intent);
//                } else {
//                    ToastUtils.showShort("暂无次设备数据");
//                }
//            }
//        });
//    }
//
//    private void setData() {
//        try {
//            if (userinfo == null) {
//                finish();
//            }
//            tvName.setText("姓名：" + userinfo.getCUSTOMERNAME());
////            tvName.setText("姓名：测试" );
//            int age = GlobalConts.getAge(userinfo.getBIRTHDAY());
////            int age = IdCardUtil.IdNOToAge(userinfo.getIDCARD());
//            if (age != -1) {
//                tvAge.setText("年龄：" + age + "岁");
//            } else {
//                tvAge.setText("年龄：");
//            }
//
//            List<BD_DD_INFO> bdxingbie = FDbManager.getInstance(getApplicationContext())
//                    .findAllByWhereInInfoDB(BD_DD_INFO.class, "PARENTID = 'DM01-08'");
//            String sex = "";
//            for (BD_DD_INFO bdi : bdxingbie) {
//                if (userinfo.getSEX().equals(bdi.getID())) {
//                    sex = bdi.getDATAINFO();
//                }
//            }
////            TVID.setText("身份证："+userinfo.getIDCARD());
////            tv_doctor.setText("建档人："+userinfo.getDOCTOR());
////            tv_doctor.setVisibility(View.GONE);
////            if(null != userinfo.getCREATED_DATE() && !userinfo.getCREATED_DATE().equals("")){
////                String happenTime = userinfo.getCREATED_DATE();
////                tvCreatetime.setText("建档日期："+happenTime);
////            }else{
////                tvCreatetime.setText("");
////            }
//
//            if ("女".equals(sex)) {
//                tvSex.setText("性别：女");
////                iv_photo.setImageResource(R.drawable.head_youth_y);
////                ivSex.setImageResource(R.drawable.woman);
//            } else {
//                tvSex.setText("性别：男");
////                iv_photo.setImageResource(R.drawable.head_youth_x);
//            }
////            jtys_list_phone.setText(userinfo.getPHONE());
//            tv_phone.setText("电话：" + userinfo.getPHONE());
//            tvAddress.setText("住址：" + userinfo.getHOUSEHOLD_ADDR());
////            tvAddress.setText("住址：山东省济南市高新区舜天广场1号楼" );
//            tvBirthday.setText("生日：" + TimeUtils.millis2String(userinfo.getBIRTHDAY().getTime(), "yyyy-MM-dd"));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setVisionData() {
//        visionList = NovaApplication.fdbmanger.findAllByWhere(SBCL_DATA_NEW.class,
//                strWhere + " AND CL_TYPE = 'VISION' ORDER BY CL_TIME DESC limit 1");
//
//        if (visionList != null && visionList.size() > 0) {
//            try {
//                visionBean = GsonUtils.fromJson(visionList.get(0).getCL_VALUE(), VisionBean.class);
//
//                tvLeftSl.setText(visionBean.getEleft());
//                tvRightSl.setText(visionBean.getEright());
//
//                tvLeftS.setText(visionBean.getQjsLeft());
//                tvLeftC.setText(visionBean.getZjcLeft());
//                tvLeftA.setText(visionBean.getZdaLeft());
//
//                tvRightS.setText(visionBean.getQjsRight());
//                tvRightC.setText(visionBean.getZjcRight());
//                tvRightA.setText(visionBean.getZdaRight());
//                tvTimeVision.setText("测量时间：" + visionList.get(0).getCL_TIME());
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        } else {
//            llVision.setVisibility(View.GONE);
//        }
//    }
//
//    private void setUeData() {
//        ueList = NovaApplication.fdbmanger.findAllByWhere(SBCL_DATA_NEW.class,
//                strWhere + " AND CL_TYPE = 'UE' ORDER BY CL_TIME DESC");
//        if (ueList != null && ueList.size() > 0) {
//            try {
//                ueModel = GsonUtils.fromJson(ueList.get(0).getCL_VALUE(), UeModel.class);
//                kanghuaixuesuan.setText(ueModel.getVc());
//                tvYinxue.setText(ueModel.getBld());
//                tvTongti.setText(ueModel.getKet());
//                tvTongti.setText(ueModel.getKet());
//                tvBaixibao.setText(ueModel.getLeu());
//                tvYaxiaosuanyan.setText(ueModel.getNit());
//                tvNiaodanyuan.setText(ueModel.getUro());
//                tvDbz.setText(ueModel.getPro());
//                tvDanhongsu.setText(ueModel.getBil());
//                tvPutaotang.setText(ueModel.getGlu());
//                tvBizhong.setText(ueModel.getSg());
//                tvPh.setText(ueModel.getPh());
//                tv_time_ue.setText("测量时间：" + ueList.get(0).getCL_TIME());
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        } else {
//            ll_ue.setVisibility(View.GONE);
//        }
//
//    }
//
//    /**
//     * 人体成分
//     */
//    private void setRtcfData() {
//        rtcfList = NovaApplication.fdbmanger.findAllByWhere(SBCL_DATA_NEW.class,
//                strWhere + " AND CL_TYPE = '" + DeviceEnum.RTCF.getDeviceType() + "' ORDER BY CL_TIME DESC limit 1");
//
//        if (rtcfList != null && rtcfList.size() > 0) {
//            try {
//                fmModel = GsonUtils.fromJson(rtcfList.get(0).getCL_VALUE(), FmModel.class);
//                tvTimeRtcf.setText(rtcfList.get(0).getCL_TIME());
//                if (fmModel != null) {
//                    if (!TextUtils.isEmpty(fmModel.getHeight())) {
//                        tvRtcfHeight.setText(fmModel.getHeight() + "cm");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getWeight())) {
//                        tvRtcfWeight.setText(fmModel.getWeight() + "kg");
//                    }
//
//                    if (!TextUtils.isEmpty(fmModel.getBmi())) {
//                        tvRtcfBmi.setText(fmModel.getBmi() + "");
//                    }
//
//                    if (!TextUtils.isEmpty(fmModel.getFp())) {
//                        tvRtcfZfl.setText(fmModel.getFp() + "%");
//                    }
//
//                    if (!TextUtils.isEmpty(fmModel.getTbwc())) {
//                        tvRtcfSfl.setText(fmModel.getTbwc() + "%");
//                    }
//
//                    if (!TextUtils.isEmpty(fmModel.getMm())) {
//                        tvRtcfJrl.setText(fmModel.getMm() + "kg");
//                    }
//
//                    if (!TextUtils.isEmpty(fmModel.getSm())) {
//                        tvRtcfGl.setText(fmModel.getSm() + "kg");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getBmr())) {
//                        tvRtcfJcdx.setText(fmModel.getBmr() + "");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getVfal())) {
//                        tvRtcfNzzfdj.setText(fmModel.getVfal() + "级");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getBodyAge())) {
//                        tvRtcfAge.setText(fmModel.getBodyAge() + "岁");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getProteinRate())) {
//                        tvRtcfDbzl.setText(fmModel.getProteinRate() + "%");
//                    }
//                    if (!TextUtils.isEmpty(fmModel.getEwr())) {
//                        tvRtcfXbwsfl.setText(fmModel.getEwr() + "%");
//                    }
//                }
//                tvTimeRtcf.setText("测量时间：" + rtcfList.get(0).getCL_TIME());
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        } else {
//            llRtcf.setVisibility(View.GONE);
//        }
//    }
//
//    private void zxing(String name) {
//        int width = 260;
//        int height = 260;
//        QRCodeWriter qrCodeWriter = new QRCodeWriter();
//        Map<EncodeHintType, String> hints = new HashMap<>();
//        hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); //记得要自定义长宽
//        BitMatrix encode = null;
//        try {
//            encode = qrCodeWriter.encode(name, BarcodeFormat.QR_CODE, width, height, hints);
//        } catch (WriterException e) {
//            e.printStackTrace();
//        }
//        int[] colors = new int[width * height];
//        //利用for循环将要表示的信息写出来
//        for (int i = 0; i < width; i++) {
//            for (int j = 0; j < height; j++) {
//                if (encode.get(i, j)) {
//                    colors[i * width + j] = Color.BLACK;
//                } else {
//                    colors[i * width + j] = Color.WHITE;
//                }
//            }
//        }
//
//        Bitmap bit = Bitmap.createBitmap(colors, width, height, Bitmap.Config.RGB_565);
//        iv_code.setImageBitmap(bit);
//    }
//
//
//    private TjbgBean tjbgBeanXy, tjbgBeanBg,tjbgBeanFM, tjbgBeanAH, tjbgBeanBO, tjbgBeanECG, tjbgBeanDGC, tjbgBeanNS, tjbgBeanBF_TC,
//            tjbgBeanBF_TG,tjbgBeanBF_HDL,tjbgBeanBF_LDL,tjbgBeanXHDB, tjbgBeanZYTZBS,tjbgBeanWAIST;
//    private TextView tv_tjbg_name, tv_tjbg_sex, tv_tjbg_age, tv_tjbg_phone, tv_tjbg_address, tv_tjbg_gy,
//            tv_tjbg_gy_status, tv_tjbg_gy_time, tv_tjbg_dy, tv_tjbg_dy_status, tv_tjbg_dy_time,
//            tv_tjbg_xinlv, tv_tjbg_xinlv_status, tv_tjbg_xinlv_time,
//            tv_tjbg_xuetang, tv_tjbg_xuetang_status, tv_tjbg_xuetang_time,
//            tv_tjbg_shengao, tv_tjbg_shengao_status, tv_tjbg_shengao_time,
//            tv_tjbg_tizhong, tv_tjbg_tizhong_status, tv_tjbg_tizhong_time,
//            tv_tjbg_bmi, tv_tjbg_bmi_status, tv_tjbg_bmi_time,
//            tv_tjbg_tiwen, tv_tjbg_tiwen_status, tv_tjbg_tiwen_time,
//            tv_tjbg_xueyang, tv_tjbg_xueyang_status, tv_tjbg_xueyang_time,
//            tv_tjbg_maibo, tv_tjbg_maibo_status, tv_tjbg_maibo_time,
//            ll_tjbg_xinlv2, ll_tjbg_xinlv2_status, ll_tjbg_xinlv2_time,ll_tjbg_xinlv2_result,ll_tjbg_xinlv2_time1,
//            tv_tjbg_danguchun, tv_tjbg_danguchun_status, tv_tjbg_danguchun_time,
//            tv_tjbg_niaosuan, tv_tjbg_niaosuan_status, tv_tjbg_niaosuan_time,
//            tv_tjbg_zongdanguchun, tv_tjbg_zongdanguchun_status, tv_tjbg_zongdanguchun_time,
//            tv_ganyousanzhi, tv_ganyousanzhi_status, tv_ganyousanzhi_time,
//            tv_gmddb, tv_gmddb_status, tv_gmddb_time,
//            tv_dmddb, tv_dmddb_status, tv_dmddb_time,
//            tv_tjbg_xhdb, tv_tjbg_xhdb_status, tv_tjbg_xhdb_time,
//            tv_tjbg_yantunbi, tv_tjbg_yantunbi_status, tv_tjbg_yantunbi_time,
//            tv_tjbg_yaowei,tv_tjbg_yaowei_time,tv_tjbg_tunwei,tv_tjbg_tunwei_time,
//            tv_tjbg_tizhi, tv_tjbg_tizhi_status, tv_tjbg_tizhi_time,
//            tv_tjbg_defen, tv_tjbg_defen_status, tv_tjbg_defen_time,
//            tv_tjbg_shili_l, tv_tjbgqiujing_l, tv_tjbg_zhujing_l,tv_tjbg_zhoudu_l,
//            tv_tjbg_shili_r, tv_tjbg_qiujing_r, tv_tjbg_zhujing_r,tv_tjbg_zhoudu_r,
//            tv_shili_time,tv_shili_time1,tv_shili_time2,tv_shili_time3,tv_shili_time4,tv_shili_time5,
//            tv_shili_time6, tv_shili_time7,
//            tv_tjbg_rtcf_height, tv_tjbg_rtcf_weight,tv_tjbg_rtcf_bmi,tv_tjbg_rtcf_zfl,tv_tjbg_rtcf_sfl,
//            tv_tjbg_rtcf_jrl, tv_tjbg_rtcf_gl,tv_tjbg_rtcf_nzzfdj,tv_tjbg_rtcf_jcdx,tv_tjbg_rtcf_age,
//            tv_tjbg_rtcf_dbzl, tv_tjbg_rtcf_xbwsfl,tv_rtcf_time,tv_rtcf_time1,tv_rtcf_time2,tv_rtcf_time3,
//            tv_rtcf_time4, tv_rtcf_time5,tv_rtcf_time6,tv_rtcf_time7,tv_rtcf_time8,tv_rtcf_time9,
//            tv_rtcf_time10, tv_rtcf_time11,
//            tv_tjbg_ue_wc, tv_tjbg_ue_qianxue,tv_tjbg_ue_tongti,tv_tjbg_ue_baixibao,tv_tjbg_ue_yaxiaosuanyan,
//            tv_tjbg_ue_niaodanyuan, tv_tjbg_ue_danbaizhi,tv_tjbg_ue_danhongsu,tv_tjbg_ue_putaotang,
//            tv_tjbg_ue_bizhong, tv_tjbg_ue_ph,
//            tv_tjbg_ue_time,tv_tjbg_ue_time1,tv_tjbg_ue_time2,tv_tjbg_ue_time3,tv_tjbg_ue_time4,tv_tjbg_ue_time5,
//            tv_tjbg_ue_time6,tv_tjbg_ue_time7,tv_tjbg_ue_time8,tv_tjbg_ue_time9,tv_tjbg_ue_time10,
//            tv_tjbg_rtcf_bmi_status,tv_tjbg_rtcf_nzzfdj_status
//            ;
//
//    private LinearLayout ll_xy, ll_xuetang, ll_shengao, ll_tiwen, ll_xueyang, ll_xinlv, ll_danguchun,
//            ll_niaosuan, ll_zongdanguchun, ll_ganyousanzhi, ll_gmddb, ll_dmddb, ll_xhdb, ll_yantunbi,
//            ll_zhongyi, ll_shili, ll_tjbg_rtcf,ll_tjbg_ncg;
//
//    private void findTjbgView() {
//        LayoutInflater inflater = LayoutInflater.from(this);
//        tjbgView = inflater.inflate(R.layout.activity_tjbg_new_test1, null);
//
//        if (tjData != null && tjData.size() > 0) {
//            for (int i = 0; i < tjData.size(); i++) {
//                TjbgBean tjbgBean = tjData.get(i);
//                if ("BP".equals(tjbgBean.getType())) {
//                    tjbgBeanXy = tjbgBean;
//                } else if ("BG".equals(tjbgBean.getType())) {
//                    tjbgBeanBg = tjbgBean;
//                } else if ("FM".equals(tjbgBean.getType())) {
//                    tjbgBeanFM = tjbgBean;
//                } else if ("AH".equals(tjbgBean.getType())) {
//                    tjbgBeanAH = tjbgBean;
//                } else if ("BO".equals(tjbgBean.getType())) {
//                    tjbgBeanBO = tjbgBean;
//                } else if ("ECG".equals(tjbgBean.getType())) {
//                    tjbgBeanECG = tjbgBean;
//                } else if ("DGC".equals(tjbgBean.getType())) {
//                    tjbgBeanDGC = tjbgBean;
//                } else if ("NS".equals(tjbgBean.getType())) {
//                    tjbgBeanNS = tjbgBean;
//                } else if ("BF_TC".equals(tjbgBean.getType())) {
//                    tjbgBeanBF_TC = tjbgBean;
//                } else if ("BF_TG".equals(tjbgBean.getType())) {
//                    tjbgBeanBF_TG = tjbgBean;
//                } else if ("BF_HDL".equals(tjbgBean.getType())) {
//                    tjbgBeanBF_HDL = tjbgBean;
//                } else if ("BF_LDL".equals(tjbgBean.getType())) {
//                    tjbgBeanBF_LDL = tjbgBean;
//                } else if ("XHDB".equals(tjbgBean.getType())) {
//                    tjbgBeanXHDB = tjbgBean;
//                } else if (DeviceConstant.ZYTZBS.equals(tjbgBean.getType())) {
//                    tjbgBeanZYTZBS = tjbgBean;
//                } else if ("WAIST".equals(tjbgBean.getType())) {
//                    tjbgBeanWAIST = tjbgBean;
//                }
//            }
//        }
//
//        setTjbgUserInfo();
//        setTjbgXyData(tjbgBeanXy);
//        setTjbgBgData(tjbgBeanBg);
//        setTjbgHeightData(tjbgBeanFM);
//        setTjbgAhData(tjbgBeanAH);
//        setTjbgBOData(tjbgBeanBO);
//
//        setTjbgECGData(tjbgBeanECG);
//        setTjbgDGCData(tjbgBeanDGC);
//        setTjbgNSData(tjbgBeanNS);
//        setTjbgBF_TCData(tjbgBeanBF_TC);
//        setTjbgBF_TGData(tjbgBeanBF_TG);
//        setTjbgBF_HDLData(tjbgBeanBF_HDL);
//        setTjbgBF_LDLData(tjbgBeanBF_LDL);
//        setTjbgXHDBData(tjbgBeanXHDB);
//        setTjbgZYTZBSData(tjbgBeanZYTZBS);
//        setTjbgWAISTData(tjbgBeanWAIST);
//        setTjbgShiLiData();
//        setTjbgRtcfData();
//        setTjbgNcgData();
//    }
//
//    private void setTjbgUserInfo() {
//        tv_tjbg_name = tjbgView.findViewById(R.id.tv_tjbg_name);
//        tv_tjbg_sex = tjbgView.findViewById(R.id.tv_tjbg_sex);
//        tv_tjbg_age = tjbgView.findViewById(R.id.tv_tjbg_age);
//        tv_tjbg_phone = tjbgView.findViewById(R.id.tv_tjbg_phone);
//        tv_tjbg_address = tjbgView.findViewById(R.id.tv_tjbg_address);
//
//        if (userinfo == null) {
//            finish();
//        }
//        tv_tjbg_name.setText("姓名：" + userinfo.getCUSTOMERNAME());
//        int age = GlobalConts.getAge(userinfo.getBIRTHDAY());
//        if (age != -1) {
//            tv_tjbg_age.setText("年龄：" + age + "岁");
//        } else {
//            tv_tjbg_age.setText("年龄：");
//        }
//
//        try {
//            List<BD_DD_INFO> bdxingbie = FDbManager.getInstance(getApplicationContext())
//                    .findAllByWhereInInfoDB(BD_DD_INFO.class, "PARENTID = 'DM01-08'");
//            String sex = "";
//            for (BD_DD_INFO bdi : bdxingbie) {
//                if (userinfo.getSEX().equals(bdi.getID())) {
//                    sex = bdi.getDATAINFO();
//                }
//            }
//            if ("女".equals(sex)) {
//                tv_tjbg_sex.setText("性别：女");
//            } else {
//                tv_tjbg_sex.setText("性别：男");
//            }
//            tv_tjbg_phone.setText("电话：" + userinfo.getPHONE());
//            tv_tjbg_address.setText("住址：" + userinfo.getHOUSEHOLD_ADDR());
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//    private void setTjbgXyData(TjbgBean tjbgBean) {
//        try {
//            ll_xy = tjbgView.findViewById(R.id.ll_xy);
//            tv_tjbg_gy = tjbgView.findViewById(R.id.tv_tjbg_gy);
//            tv_tjbg_gy_status = tjbgView.findViewById(R.id.tv_tjbg_gy_status);
//            tv_tjbg_gy_time = tjbgView.findViewById(R.id.tv_tjbg_gy_time);
//            tv_tjbg_dy = tjbgView.findViewById(R.id.tv_tjbg_dy);
//            tv_tjbg_dy_status = tjbgView.findViewById(R.id.tv_tjbg_dy_status);
//            tv_tjbg_dy_time = tjbgView.findViewById(R.id.tv_tjbg_dy_time);
//            tv_tjbg_xinlv = tjbgView.findViewById(R.id.tv_tjbg_xinlv);
//            tv_tjbg_xinlv_status = tjbgView.findViewById(R.id.tv_tjbg_xinlv_status);
//            tv_tjbg_xinlv_time = tjbgView.findViewById(R.id.tv_tjbg_xinlv_time);
//            if (tjbgBean != null) {
//                BpModel bpModel = (BpModel) tjbgBean.getData();
//                tv_tjbg_gy.setText(bpModel.getHighpressure() + "mmHg");
//                tv_tjbg_dy.setText(bpModel.getLowvoltage() + "mmHg");
//                tv_tjbg_xinlv.setText(bpModel.getPulse() + "次/分");
//                tv_tjbg_gy_time.setText(tjbgBean.getTime());
//                tv_tjbg_dy_time.setText(tjbgBean.getTime());
//                tv_tjbg_xinlv_time.setText(tjbgBean.getTime());
//                ll_xy.setVisibility(View.VISIBLE);
//
//                if (Integer.parseInt(bpModel.getHighpressure()) < 90) {
//                    tv_tjbg_gy_status.setText("偏低");
//                } else if (Integer.parseInt(bpModel.getHighpressure()) >= 90 && Integer.parseInt(bpModel.getHighpressure()) <= 140) {
//                    tv_tjbg_gy_status.setText("正常");
//                } else {
//                    tv_tjbg_gy_status.setText("偏高");
//                }
//
//                if (Integer.parseInt(bpModel.getLowvoltage()) < 60) {
//                    tv_tjbg_dy_status.setText("偏低");
//                } else if (Integer.parseInt(bpModel.getLowvoltage()) >= 60 && Integer.parseInt(bpModel.getLowvoltage()) <= 90) {
//                    tv_tjbg_dy_status.setText("正常");
//                } else {
//                    tv_tjbg_dy_status.setText("偏高");
//                }
//
//                if (Integer.parseInt(bpModel.getPulse()) < 60) {
//                    tv_tjbg_xinlv_status.setText("偏低");
//                } else if (Integer.parseInt(bpModel.getPulse()) >= 60 && Integer.parseInt(bpModel.getPulse()) <= 100) {
//                    tv_tjbg_xinlv_status.setText("正常");
//                } else {
//                    tv_tjbg_xinlv_status.setText("偏高");
//                }
//
//            } else {
//                ll_xy.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgBgData(TjbgBean tjbgBean) {
//        try {
//            ll_xuetang = tjbgView.findViewById(R.id.ll_xuetang);
//            tv_tjbg_xuetang = tjbgView.findViewById(R.id.tv_tjbg_xuetang);
//            tv_tjbg_xuetang_status = tjbgView.findViewById(R.id.tv_tjbg_xuetang_status);
//            tv_tjbg_xuetang_time = tjbgView.findViewById(R.id.tv_tjbg_xuetang_time);
//            if (tjbgBean != null) {
//                tv_tjbg_xuetang.setText(tjbgBean.getData().toString() + "mmol/L");
//                tv_tjbg_xuetang_time.setText(tjbgBean.getTime());
//                ll_xuetang.setVisibility(View.VISIBLE);
//                if (Double.parseDouble(tjbgBean.getData().toString()) <= 5.6) {
//                    tv_tjbg_xuetang_status.setText("正常");
//                } else {
//                    tv_tjbg_xuetang_status.setText("偏高");
//                }
//            } else {
//                ll_xuetang.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgHeightData(TjbgBean tjbgBean) {
//        try {
//            ll_shengao = tjbgView.findViewById(R.id.ll_shengao);
//            tv_tjbg_shengao = tjbgView.findViewById(R.id.tv_tjbg_shengao);
//            tv_tjbg_shengao_status = tjbgView.findViewById(R.id.tv_tjbg_shengao_status);
//            tv_tjbg_shengao_time = tjbgView.findViewById(R.id.tv_tjbg_shengao_time);
//            tv_tjbg_tizhong = tjbgView.findViewById(R.id.tv_tjbg_tizhong);
//            tv_tjbg_tizhong_status = tjbgView.findViewById(R.id.tv_tjbg_tizhong_status);
//            tv_tjbg_tizhong_time = tjbgView.findViewById(R.id.tv_tjbg_tizhong_time);
//            tv_tjbg_bmi = tjbgView.findViewById(R.id.tv_tjbg_bmi);
//            tv_tjbg_bmi_status = tjbgView.findViewById(R.id.tv_tjbg_bmi_status);
//            tv_tjbg_bmi_time = tjbgView.findViewById(R.id.tv_tjbg_bmi_time);
//            if (tjbgBean != null) {
//                FmModel fmModel = (FmModel) tjbgBean.getData();
//                tv_tjbg_shengao.setText(fmModel.getHeight() + "cm");
//                tv_tjbg_tizhong.setText(fmModel.getWeight() + "kg");
//                tv_tjbg_bmi.setText(fmModel.getBmi());
//                tv_tjbg_shengao_time.setText(tjbgBean.getTime());
//                tv_tjbg_tizhong_time.setText(tjbgBean.getTime());
//                tv_tjbg_bmi_time.setText(tjbgBean.getTime());
//                ll_shengao.setVisibility(View.VISIBLE);
//                if (TextUtils.isEmpty(fmModel.getHeight())) {
//                    tv_tjbg_tizhong.setText(fmModel.getWeight() + "kg");
//                } else {
//                    if (TextUtils.isEmpty(fmModel.getBmi())) {
//                        tv_tjbg_shengao.setText(fmModel.getHeight() + "cm");
//                        tv_tjbg_tizhong.setText(fmModel.getWeight() + "kg");
//                        double dh = Double.parseDouble(fmModel.getHeight()) / 100;
//                        double dw = Double.parseDouble(fmModel.getWeight());
//                        double bmi = GlobalConts.getBMI(dh, dw);
//                        java.text.DecimalFormat df = new java.text.DecimalFormat("#.00");
//                        fmModel.setBmi(df.format(bmi));
//                        tv_tjbg_bmi.setText(fmModel.getBmi());
//                    } else {
//                        tv_tjbg_shengao.setText(fmModel.getHeight() + "cm");
//                        tv_tjbg_tizhong.setText(fmModel.getWeight() + "kg");
//                        tv_tjbg_bmi.setText(fmModel.getBmi());
//                    }
//                }
//
//                if (Double.parseDouble(fmModel.getBmi()) < 18.5) {
//                    tv_tjbg_bmi_status.setText("偏低");
//                } else if (Double.parseDouble(fmModel.getBmi()) >= 18.5 && Double.parseDouble(fmModel.getBmi()) <= 24.9) {
//                    tv_tjbg_bmi_status.setText("正常");
//                } else {
//                    tv_tjbg_bmi_status.setText("偏高");
//                }
//            } else {
//                ll_shengao.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgAhData(TjbgBean tjbgBean) {
//        try {
//            ll_tiwen = tjbgView.findViewById(R.id.ll_tiwen);
//            tv_tjbg_tiwen = tjbgView.findViewById(R.id.tv_tjbg_tiwen);
//            tv_tjbg_tiwen_status = tjbgView.findViewById(R.id.tv_tjbg_tiwen_status);
//            tv_tjbg_tiwen_time = tjbgView.findViewById(R.id.tv_tjbg_tiwen_time);
//            if (tjbgBean != null) {
//                tv_tjbg_tiwen.setText(tjbgBean.getData().toString() + "℃");
//                tv_tjbg_tiwen_time.setText(tjbgBean.getTime());
//                ll_tiwen.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 35.9) {
//                    tv_tjbg_tiwen_status.setText("偏低");
//                } else if (Double.parseDouble(tjbgBean.getData().toString()) >= 35.9
//                        && Double.parseDouble(tjbgBean.getData().toString()) <= 37.6) {
//                    tv_tjbg_tiwen_status.setText("正常");
//                } else {
//                    tv_tjbg_tiwen_status.setText("偏高");
//                }
//            } else {
//                ll_tiwen.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgBOData(TjbgBean tjbgBean) {
//        try {
//            ll_xueyang = tjbgView.findViewById(R.id.ll_xueyang);
//            tv_tjbg_xueyang = tjbgView.findViewById(R.id.tv_tjbg_xueyang);
//            tv_tjbg_xueyang_status = tjbgView.findViewById(R.id.tv_tjbg_xueyang_status);
//            tv_tjbg_xueyang_time = tjbgView.findViewById(R.id.tv_tjbg_xueyang_time);
//            tv_tjbg_maibo = tjbgView.findViewById(R.id.tv_tjbg_maibo);
//            tv_tjbg_maibo_status = tjbgView.findViewById(R.id.tv_tjbg_maibo_status);
//            tv_tjbg_maibo_time = tjbgView.findViewById(R.id.tv_tjbg_maibo_time);
//            if (tjbgBean != null) {
//                PoModel boModel = (PoModel) tjbgBean.getData();
//                tv_tjbg_xueyang.setText(boModel.getBloodOxygenSaturation() + "%");
//                tv_tjbg_maibo.setText(boModel.getHeartRate() + "次/分");
//                tv_tjbg_xueyang_time.setText(tjbgBean.getTime());
//                tv_tjbg_maibo_time.setText(tjbgBean.getTime());
//                ll_xueyang.setVisibility(View.VISIBLE);
//
//                if (Integer.parseInt(boModel.getBloodOxygenSaturation()) < 95) {
//                    tv_tjbg_xueyang_status.setText("偏低");
//                } else{
//                    tv_tjbg_xueyang_status.setText("正常");
//                }
//
//                if (Integer.parseInt(boModel.getHeartRate()) < 60) {
//                    tv_tjbg_maibo_status.setText("偏低");
//                } else if (Integer.parseInt(boModel.getHeartRate()) >= 60 && Integer.parseInt(boModel.getHeartRate()) <= 100) {
//                    tv_tjbg_maibo_status.setText("正常");
//                } else {
//                    tv_tjbg_maibo_status.setText("偏高");
//                }
//            } else {
//                ll_xueyang.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgECGData(TjbgBean tjbgBean) {
//        try {
//            ll_xinlv = tjbgView.findViewById(R.id.ll_xinlv);
//            ll_tjbg_xinlv2 = tjbgView.findViewById(R.id.ll_tjbg_xinlv2);
//            ll_tjbg_xinlv2_status = tjbgView.findViewById(R.id.ll_tjbg_xinlv2_status);
//            ll_tjbg_xinlv2_time = tjbgView.findViewById(R.id.ll_tjbg_xinlv2_time);
//            ll_tjbg_xinlv2_result = tjbgView.findViewById(R.id.ll_tjbg_xinlv2_result);
//            ll_tjbg_xinlv2_time1 = tjbgView.findViewById(R.id.ll_tjbg_xinlv2_time1);
//            if (tjbgBean != null) {
//                EcgModel ecgModel = (EcgModel) tjbgBean.getData();
//                ll_tjbg_xinlv2.setText(ecgModel.getHr() + "次/分");
//                ll_tjbg_xinlv2_result.setText(ecgModel.getEcgResult());
//                ll_tjbg_xinlv2_time.setText(tjbgBean.getTime());
//                ll_tjbg_xinlv2_time1.setText(tjbgBean.getTime());
//                ll_xinlv.setVisibility(View.VISIBLE);
//
//                if (Integer.parseInt(ecgModel.getHr()) < 60) {
//                    ll_tjbg_xinlv2_status.setText("偏低");
//                } else if (Integer.parseInt(ecgModel.getHr()) >= 60 && Integer.parseInt(ecgModel.getHr()) <= 100) {
//                    ll_tjbg_xinlv2_status.setText("正常");
//                } else {
//                    ll_tjbg_xinlv2_status.setText("偏高");
//                }
//            } else {
//                ll_xinlv.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgDGCData(TjbgBean tjbgBean) {
//        try {
//            ll_danguchun = tjbgView.findViewById(R.id.ll_danguchun);
//            tv_tjbg_danguchun = tjbgView.findViewById(R.id.tv_tjbg_danguchun);
//            tv_tjbg_danguchun_status = tjbgView.findViewById(R.id.tv_tjbg_danguchun_status);
//            tv_tjbg_danguchun_time = tjbgView.findViewById(R.id.tv_tjbg_danguchun_time);
//            if (tjbgBean != null) {
//                tv_tjbg_danguchun.setText(tjbgBean.getData() + "mmol/L");
//                tv_tjbg_danguchun_time.setText(tjbgBean.getTime());
//                ll_danguchun.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 5.2) {
//                    tv_tjbg_danguchun_status.setText("正常");
//                } else {
//                    tv_tjbg_danguchun_status.setText("偏高");
//                }
//            } else {
//                ll_danguchun.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgNSData(TjbgBean tjbgBean) {
//        try {
//            ll_niaosuan = tjbgView.findViewById(R.id.ll_niaosuan);
//            tv_tjbg_niaosuan = tjbgView.findViewById(R.id.tv_tjbg_niaosuan);
//            tv_tjbg_niaosuan_status = tjbgView.findViewById(R.id.tv_tjbg_niaosuan_status);
//            tv_tjbg_niaosuan_time = tjbgView.findViewById(R.id.tv_tjbg_niaosuan_time);
//            if (tjbgBean != null) {
//                tv_tjbg_niaosuan.setText(tjbgBean.getData() + "μmol/L");
//                tv_tjbg_niaosuan_time.setText(tjbgBean.getTime());
//                ll_niaosuan.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 200) {
//                    tv_tjbg_niaosuan_status.setText("偏低");
//                } else if (Double.parseDouble(tjbgBean.getData().toString()) >= 200
//                        && Double.parseDouble(tjbgBean.getData().toString()) <= 420) {
//                    tv_tjbg_niaosuan_status.setText("正常");
//                } else {
//                    tv_tjbg_niaosuan_status.setText("偏高");
//                }
//            } else {
//                ll_niaosuan.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//    private void setTjbgBF_TCData(TjbgBean tjbgBean) {
//        try {
//            ll_zongdanguchun = tjbgView.findViewById(R.id.ll_zongdanguchun);
//            tv_tjbg_zongdanguchun = tjbgView.findViewById(R.id.tv_tjbg_zongdanguchun);
//            tv_tjbg_zongdanguchun_status = tjbgView.findViewById(R.id.tv_tjbg_zongdanguchun_status);
//            tv_tjbg_zongdanguchun_time = tjbgView.findViewById(R.id.tv_tjbg_zongdanguchun_time);
//            if (tjbgBean != null) {
//                tv_tjbg_zongdanguchun.setText(tjbgBean.getData() + "mmol/L");
//                tv_tjbg_zongdanguchun_time.setText(tjbgBean.getTime());
//                ll_zongdanguchun.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 5.2) {
//                    tv_tjbg_zongdanguchun_status.setText("正常");
//                } else {
//                    tv_tjbg_zongdanguchun_status.setText("偏高");
//                }
//            } else {
//                ll_zongdanguchun.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//    private void setTjbgBF_TGData(TjbgBean tjbgBean) {
//        try {
//            ll_ganyousanzhi = tjbgView.findViewById(R.id.ll_ganyousanzhi);
//            tv_ganyousanzhi = tjbgView.findViewById(R.id.tv_ganyousanzhi);
//            tv_ganyousanzhi_status = tjbgView.findViewById(R.id.tv_ganyousanzhi_status);
//            tv_ganyousanzhi_time = tjbgView.findViewById(R.id.tv_ganyousanzhi_time);
//            if (tjbgBean != null) {
//                tv_ganyousanzhi.setText(tjbgBean.getData() + "mmol/L");
//                tv_ganyousanzhi_time.setText(tjbgBean.getTime());
//                ll_ganyousanzhi.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 0.45) {
//                    tv_ganyousanzhi_status.setText("偏低");
//                } else if (Double.parseDouble(tjbgBean.getData().toString()) >= 0.45
//                        && Double.parseDouble(tjbgBean.getData().toString()) <= 1.69) {
//                    tv_ganyousanzhi_status.setText("正常");
//                } else {
//                    tv_ganyousanzhi_status.setText("偏高");
//                }
//            } else {
//                ll_ganyousanzhi.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgBF_HDLData(TjbgBean tjbgBean) {
//        try {
//            ll_gmddb = tjbgView.findViewById(R.id.ll_gmddb);
//            tv_gmddb = tjbgView.findViewById(R.id.tv_gmddb);
//            tv_gmddb_status = tjbgView.findViewById(R.id.tv_gmddb_status);
//            tv_gmddb_time = tjbgView.findViewById(R.id.tv_gmddb_time);
//            if (tjbgBean != null) {
//                tv_gmddb.setText(tjbgBean.getData() + "mmol/L");
//                tv_gmddb_time.setText(tjbgBean.getTime());
//                ll_gmddb.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(tjbgBean.getData().toString()) < 0.72) {
//                    tv_gmddb_status.setText("偏低");
//                } else if (Double.parseDouble(tjbgBean.getData().toString()) >= 0.72
//                        && Double.parseDouble(tjbgBean.getData().toString()) <= 2) {
//                    tv_gmddb_status.setText("正常");
//                } else {
//                    tv_gmddb_status.setText("偏高");
//                }
//            } else {
//                ll_gmddb.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//    private void setTjbgBF_LDLData(TjbgBean tjbgBean) {
//        try {
//            ll_dmddb = tjbgView.findViewById(R.id.ll_dmddb);
//            tv_dmddb = tjbgView.findViewById(R.id.tv_dmddb);
//            tv_dmddb_status = tjbgView.findViewById(R.id.tv_dmddb_status);
//            tv_dmddb_time = tjbgView.findViewById(R.id.tv_dmddb_time);
//            if (tjbgBean != null) {
//                tv_dmddb.setText(tjbgBean.getData() + "mmol/L");
//                tv_dmddb_time.setText(tjbgBean.getTime());
//                ll_dmddb.setVisibility(View.VISIBLE);
//                if (Double.parseDouble(tjbgBean.getData().toString()) <= 3.37) {
//                    tv_dmddb_status.setText("正常");
//                } else {
//                    tv_dmddb_status.setText("偏高");
//                }
//            } else {
//                ll_dmddb.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgXHDBData(TjbgBean tjbgBean) {
//        try {
//            ll_xhdb = tjbgView.findViewById(R.id.ll_xhdb);
//            tv_tjbg_xhdb = tjbgView.findViewById(R.id.tv_tjbg_xhdb);
//            tv_tjbg_xhdb_status = tjbgView.findViewById(R.id.tv_tjbg_xhdb_status);
//            tv_tjbg_xhdb_time = tjbgView.findViewById(R.id.tv_tjbg_xhdb_time);
//            if (tjbgBean != null) {
//                tv_tjbg_xhdb.setText(tjbgBean.getData() + "g/dl");
//                tv_tjbg_xhdb_time.setText(tjbgBean.getTime());
//                ll_xhdb.setVisibility(View.VISIBLE);
//            } else {
//                ll_xhdb.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgZYTZBSData(TjbgBean tjbgBean) {
//        try {
//            ll_zhongyi = tjbgView.findViewById(R.id.ll_zhongyi);
//            tv_tjbg_tizhi = tjbgView.findViewById(R.id.tv_tjbg_tizhi);
//            tv_tjbg_tizhi_status = tjbgView.findViewById(R.id.tv_tjbg_tizhi_status);
//            tv_tjbg_tizhi_time = tjbgView.findViewById(R.id.tv_tjbg_tizhi_time);
//            tv_tjbg_defen = tjbgView.findViewById(R.id.tv_tjbg_defen);
//            tv_tjbg_defen_status = tjbgView.findViewById(R.id.tv_tjbg_defen_status);
//            tv_tjbg_defen_time = tjbgView.findViewById(R.id.tv_tjbg_defen_time);
//            if (tjbgBean != null) {
//                ZytzcsjgBean zytzcsjgBean = (ZytzcsjgBean) tjbgBean.getData();
//                tv_tjbg_tizhi.setText(zytzcsjgBean.getTzName() + "");
//                tv_tjbg_defen.setText(zytzcsjgBean.getTzScore() + "");
//                tv_tjbg_tizhi_time.setText(tjbgBean.getTime());
//                tv_tjbg_defen_time.setText(tjbgBean.getTime());
//                ll_zhongyi.setVisibility(View.VISIBLE);
//            } else {
//                ll_zhongyi.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgWAISTData(TjbgBean tjbgBean) {
//        try {
//            ll_yantunbi = tjbgView.findViewById(R.id.ll_yantunbi);
//            tv_tjbg_yantunbi = tjbgView.findViewById(R.id.tv_tjbg_yantunbi);
//            tv_tjbg_yantunbi_status = tjbgView.findViewById(R.id.tv_tjbg_yantunbi_status);
//            tv_tjbg_yantunbi_time = tjbgView.findViewById(R.id.tv_tjbg_yantunbi_time);
//
//            tv_tjbg_yaowei = tjbgView.findViewById(R.id.tv_tjbg_yaowei);
//            tv_tjbg_yaowei_time = tjbgView.findViewById(R.id.tv_tjbg_yaowei_time);
//            tv_tjbg_tunwei = tjbgView.findViewById(R.id.tv_tjbg_tunwei);
//            tv_tjbg_tunwei_time = tjbgView.findViewById(R.id.tv_tjbg_tunwei_time);
//            if (tjbgBean != null) {
//                WaistBean waistBean = (WaistBean) tjbgBean.getData();
//                tv_tjbg_yaowei.setText(waistBean.getWaist() + "");
//                tv_tjbg_tunwei.setText(waistBean.getHip() + "");
//                tv_tjbg_yantunbi.setText(waistBean.getRatio() + "");
//                tv_tjbg_yaowei_time.setText(tjbgBean.getTime());
//                tv_tjbg_tunwei_time.setText(tjbgBean.getTime());
//                tv_tjbg_yantunbi_time.setText(tjbgBean.getTime());
//                ll_yantunbi.setVisibility(View.VISIBLE);
//
//                if (Double.parseDouble(waistBean.getRatio()) < 0.7) {
//                    tv_tjbg_yantunbi_status.setText("偏低");
//                } else if (Double.parseDouble(waistBean.getRatio()) >= 0.7
//                        && Double.parseDouble(waistBean.getRatio()) <= 0.95) {
//                    tv_tjbg_yantunbi_status.setText("正常");
//                } else {
//                    tv_tjbg_yantunbi_status.setText("偏高");
//                }
//            } else {
//                ll_yantunbi.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgShiLiData() {
//        try {
//            ll_shili = tjbgView.findViewById(R.id.ll_shili);
//            if (visionBean != null) {
//                tv_tjbg_shili_l = tjbgView.findViewById(R.id.tv_tjbg_shili_l);
//                tv_tjbgqiujing_l = tjbgView.findViewById(R.id.tv_tjbgqiujing_l);
//                tv_tjbg_zhujing_l = tjbgView.findViewById(R.id.tv_tjbg_zhujing_l);
//                tv_tjbg_zhoudu_l = tjbgView.findViewById(R.id.tv_tjbg_zhoudu_l);
//
//                tv_tjbg_shili_r = tjbgView.findViewById(R.id.tv_tjbg_shili_r);
//                tv_tjbg_qiujing_r = tjbgView.findViewById(R.id.tv_tjbg_qiujing_r);
//                tv_tjbg_zhujing_r = tjbgView.findViewById(R.id.tv_tjbg_zhujing_r);
//                tv_tjbg_zhoudu_r = tjbgView.findViewById(R.id.tv_tjbg_zhoudu_r);
//                tv_shili_time = tjbgView.findViewById(R.id.tv_shili_time);
//                tv_shili_time1 = tjbgView.findViewById(R.id.tv_shili_time1);
//                tv_shili_time2 = tjbgView.findViewById(R.id.tv_shili_time2);
//                tv_shili_time3 = tjbgView.findViewById(R.id.tv_shili_time3);
//                tv_shili_time4 = tjbgView.findViewById(R.id.tv_shili_time4);
//                tv_shili_time5 = tjbgView.findViewById(R.id.tv_shili_time5);
//                tv_shili_time6 = tjbgView.findViewById(R.id.tv_shili_time6);
//                tv_shili_time7 = tjbgView.findViewById(R.id.tv_shili_time7);
//
//                tv_tjbg_shili_l.setText(visionBean.getEleft());
//                tv_tjbg_shili_r.setText(visionBean.getEright());
//
//                tv_tjbgqiujing_l.setText(visionBean.getQjsLeft());
//                tv_tjbg_zhujing_l.setText(visionBean.getZjcLeft());
//                tv_tjbg_zhoudu_l.setText(visionBean.getZdaLeft());
//
//                tv_tjbg_qiujing_r.setText(visionBean.getQjsRight());
//                tv_tjbg_zhujing_r.setText(visionBean.getZjcRight());
//                tv_tjbg_zhoudu_r.setText(visionBean.getZdaRight());
//                tv_shili_time.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time1.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time2.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time3.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time4.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time5.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time6.setText("" + visionList.get(0).getCL_TIME());
//                tv_shili_time7.setText("" + visionList.get(0).getCL_TIME());
//
//                ll_shili.setVisibility(View.VISIBLE);
//            } else {
//                ll_shili.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgRtcfData() {
//        try {
//            ll_tjbg_rtcf = tjbgView.findViewById(R.id.ll_tjbg_rtcf);
//
//            if (fmModel != null) {
//                tv_tjbg_rtcf_height = tjbgView.findViewById(R.id.tv_tjbg_rtcf_height);
//                tv_tjbg_rtcf_weight = tjbgView.findViewById(R.id.tv_tjbg_rtcf_weight);
//                tv_tjbg_rtcf_bmi = tjbgView.findViewById(R.id.tv_tjbg_rtcf_bmi);
//                tv_tjbg_rtcf_zfl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_zfl);
//                tv_tjbg_rtcf_sfl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_sfl);
//                tv_tjbg_rtcf_jrl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_jrl);
//                tv_tjbg_rtcf_gl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_gl);
//                tv_tjbg_rtcf_nzzfdj = tjbgView.findViewById(R.id.tv_tjbg_rtcf_nzzfdj);
//                tv_tjbg_rtcf_jcdx = tjbgView.findViewById(R.id.tv_tjbg_rtcf_jcdx);
//                tv_tjbg_rtcf_age = tjbgView.findViewById(R.id.tv_tjbg_rtcf_age);
//                tv_tjbg_rtcf_dbzl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_dbzl);
//                tv_tjbg_rtcf_xbwsfl = tjbgView.findViewById(R.id.tv_tjbg_rtcf_xbwsfl);
//                tv_tjbg_rtcf_bmi_status = tjbgView.findViewById(R.id.tv_tjbg_rtcf_bmi_status);
//                tv_tjbg_rtcf_nzzfdj_status = tjbgView.findViewById(R.id.tv_tjbg_rtcf_nzzfdj_status);
//
//                tv_rtcf_time = tjbgView.findViewById(R.id.tv_rtcf_time);
//                tv_rtcf_time1 = tjbgView.findViewById(R.id.tv_rtcf_time1);
//                tv_rtcf_time2 = tjbgView.findViewById(R.id.tv_rtcf_time2);
//                tv_rtcf_time3 = tjbgView.findViewById(R.id.tv_rtcf_time3);
//                tv_rtcf_time4 = tjbgView.findViewById(R.id.tv_rtcf_time4);
//                tv_rtcf_time5 = tjbgView.findViewById(R.id.tv_rtcf_time5);
//                tv_rtcf_time6 = tjbgView.findViewById(R.id.tv_rtcf_time6);
//                tv_rtcf_time7 = tjbgView.findViewById(R.id.tv_rtcf_time7);
//                tv_rtcf_time8 = tjbgView.findViewById(R.id.tv_rtcf_time8);
//                tv_rtcf_time9 = tjbgView.findViewById(R.id.tv_rtcf_time9);
//                tv_rtcf_time10 = tjbgView.findViewById(R.id.tv_rtcf_time10);
//                tv_rtcf_time11 = tjbgView.findViewById(R.id.tv_rtcf_time11);
//                if (!TextUtils.isEmpty(fmModel.getHeight())) {
//                    tv_tjbg_rtcf_height.setText(fmModel.getHeight() + "cm");
//                }
//                if (!TextUtils.isEmpty(fmModel.getWeight())) {
//                    tv_tjbg_rtcf_weight.setText(fmModel.getWeight() + "kg");
//                }
//
//                if (!TextUtils.isEmpty(fmModel.getBmi())) {
//                    tv_tjbg_rtcf_bmi.setText(fmModel.getBmi() + "");
//                    if (Double.parseDouble(fmModel.getBmi()) < 18.5) {
//                        tv_tjbg_rtcf_bmi_status.setText("偏低");
//                    } else if (Double.parseDouble(fmModel.getBmi()) >= 18.5
//                            && Double.parseDouble(fmModel.getBmi()) <= 24.9) {
//                        tv_tjbg_rtcf_bmi_status.setText("正常");
//                    } else {
//                        tv_tjbg_rtcf_bmi_status.setText("偏高");
//                    }
//                }
//
//                if (!TextUtils.isEmpty(fmModel.getFp())) {
//                    tv_tjbg_rtcf_zfl.setText(fmModel.getFp() + "%");
//                }
//
//                if (!TextUtils.isEmpty(fmModel.getTbwc())) {
//                    tv_tjbg_rtcf_sfl.setText(fmModel.getTbwc() + "%");
//                }
//
//                if (!TextUtils.isEmpty(fmModel.getMm())) {
//                    tv_tjbg_rtcf_jrl.setText(fmModel.getMm() + "kg");
//                }
//
//                if (!TextUtils.isEmpty(fmModel.getSm())) {
//                    tv_tjbg_rtcf_gl.setText(fmModel.getSm() + "kg");
//                }
//                if (!TextUtils.isEmpty(fmModel.getBmr())) {
//                    tv_tjbg_rtcf_jcdx.setText(fmModel.getBmr() + "");
//                }
//                if (!TextUtils.isEmpty(fmModel.getVfal())) {
//                    tv_tjbg_rtcf_nzzfdj.setText(fmModel.getVfal() + "级");
//                    try {
//                        if (Integer.parseInt(fmModel.getVfal()) <= 9) {
//                            tv_tjbg_rtcf_nzzfdj_status.setText("正常");
//                        } else {
//                            tv_tjbg_rtcf_nzzfdj_status.setText("偏高");
//                        }
//                    } catch (NumberFormatException e) {
//                        e.printStackTrace();
//                    }
//                }
//                if (!TextUtils.isEmpty(fmModel.getBodyAge())) {
//                    tv_tjbg_rtcf_age.setText(fmModel.getBodyAge() + "岁");
//                }
//                if (!TextUtils.isEmpty(fmModel.getProteinRate())) {
//                    tv_tjbg_rtcf_dbzl.setText(fmModel.getProteinRate() + "%");
//                }
//                if (!TextUtils.isEmpty(fmModel.getEwr())) {
//                    tv_tjbg_rtcf_xbwsfl.setText(fmModel.getEwr() + "%");
//                }
//                tv_rtcf_time.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time1.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time2.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time3.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time4.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time5.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time6.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time7.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time8.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time9.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time10.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time11.setText("" + rtcfList.get(0).getCL_TIME());
//                tv_rtcf_time.setText("" + rtcfList.get(0).getCL_TIME());
//                ll_tjbg_rtcf.setVisibility(View.VISIBLE);
//            } else {
//                ll_tjbg_rtcf.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private void setTjbgNcgData() {
//        try {
//            ll_tjbg_ncg = tjbgView.findViewById(R.id.ll_tjbg_ncg);
//
//            if (ueModel != null) {
//                try {
//                    tv_tjbg_ue_wc = tjbgView.findViewById(R.id.tv_tjbg_ue_wc);
//                    tv_tjbg_ue_qianxue = tjbgView.findViewById(R.id.tv_tjbg_ue_qianxue);
//                    tv_tjbg_ue_tongti = tjbgView.findViewById(R.id.tv_tjbg_ue_tongti);
//                    tv_tjbg_ue_baixibao = tjbgView.findViewById(R.id.tv_tjbg_ue_baixibao);
//                    tv_tjbg_ue_yaxiaosuanyan = tjbgView.findViewById(R.id.tv_tjbg_ue_yaxiaosuanyan);
//                    tv_tjbg_ue_niaodanyuan = tjbgView.findViewById(R.id.tv_tjbg_ue_niaodanyuan);
//                    tv_tjbg_ue_danbaizhi = tjbgView.findViewById(R.id.tv_tjbg_ue_danbaizhi);
//                    tv_tjbg_ue_danhongsu = tjbgView.findViewById(R.id.tv_tjbg_ue_danhongsu);
//                    tv_tjbg_ue_putaotang = tjbgView.findViewById(R.id.tv_tjbg_ue_putaotang);
//                    tv_tjbg_ue_bizhong = tjbgView.findViewById(R.id.tv_tjbg_ue_bizhong);
//                    tv_tjbg_ue_ph = tjbgView.findViewById(R.id.tv_tjbg_ue_ph);
//
//                    tv_tjbg_ue_time = tjbgView.findViewById(R.id.tv_tjbg_ue_time);
//                    tv_tjbg_ue_time1 = tjbgView.findViewById(R.id.tv_tjbg_ue_time1);
//                    tv_tjbg_ue_time2 = tjbgView.findViewById(R.id.tv_tjbg_ue_time2);
//                    tv_tjbg_ue_time3 = tjbgView.findViewById(R.id.tv_tjbg_ue_time3);
//                    tv_tjbg_ue_time4 = tjbgView.findViewById(R.id.tv_tjbg_ue_time4);
//                    tv_tjbg_ue_time5 = tjbgView.findViewById(R.id.tv_tjbg_ue_time5);
//                    tv_tjbg_ue_time6 = tjbgView.findViewById(R.id.tv_tjbg_ue_time6);
//                    tv_tjbg_ue_time7 = tjbgView.findViewById(R.id.tv_tjbg_ue_time7);
//                    tv_tjbg_ue_time8 = tjbgView.findViewById(R.id.tv_tjbg_ue_time8);
//                    tv_tjbg_ue_time9 = tjbgView.findViewById(R.id.tv_tjbg_ue_time9);
//                    tv_tjbg_ue_time10 = tjbgView.findViewById(R.id.tv_tjbg_ue_time10);
//
//                    tv_tjbg_ue_wc.setText(ueModel.getVc());
//                    tv_tjbg_ue_qianxue.setText(ueModel.getBld());
//                    tv_tjbg_ue_tongti.setText(ueModel.getKet());
//                    tv_tjbg_ue_baixibao.setText(ueModel.getLeu());
//                    tv_tjbg_ue_yaxiaosuanyan.setText(ueModel.getNit());
//                    tv_tjbg_ue_niaodanyuan.setText(ueModel.getUro());
//                    tv_tjbg_ue_danbaizhi.setText(ueModel.getPro());
//                    tv_tjbg_ue_danhongsu.setText(ueModel.getBil());
//                    tv_tjbg_ue_putaotang.setText(ueModel.getGlu());
//                    tv_tjbg_ue_bizhong.setText(ueModel.getSg());
//                    tv_tjbg_ue_ph.setText(ueModel.getPh());
//                    tv_tjbg_ue_time.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time1.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time2.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time3.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time4.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time5.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time6.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time7.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time8.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time9.setText("" + ueList.get(0).getCL_TIME());
//                    tv_tjbg_ue_time10.setText("" + ueList.get(0).getCL_TIME());
//                    ll_tjbg_ncg.setVisibility(View.VISIBLE);
//                } catch (Exception e) {
//                    e.printStackTrace();
//                }
//            } else {
//                ll_tjbg_ncg.setVisibility(View.GONE);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private WebView webview;
//    private void initWebView() {
//        webview = findViewById(R.id.webview);
//        WebSettings settings = webview.getSettings();
//        String url = "file:android_asset/scl90/report.html";
//        // 设置编码格式
//        settings.setDefaultTextEncodingName("utf-8");
//        // 支持js
//        settings.setJavaScriptEnabled(true);//必须得设置不然js代码不能实现
//        settings.setJavaScriptCanOpenWindowsAutomatically(true);//允许js弹出窗口
//        webview.getSettings().setDomStorageEnabled(true);
//
//        webview.loadUrl(url);
//
//        settings.setBuiltInZoomControls(true);
//        settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
//        settings.setUseWideViewPort(true);
//        settings.setLoadWithOverviewMode(true);
//        settings.setGeolocationEnabled(true);
//        settings.setDomStorageEnabled(true);
//        webview.requestFocus();
//        webview.setWebChromeClient(new WebChromeClient());
//        webview.setWebViewClient(new WebViewClient() {
//            @Override
//            public boolean shouldOverrideUrlLoading(WebView view, String url) {
//                //使用WebView加载显示url
//                view.loadUrl(url);
//                //返回true
//                return true;
//            }
//
//            @Override
//            public void onPageFinished(WebView view, String url) {
////                super.onPageFinished(view, url);
//                int densityDpi = getResources().getDisplayMetrics().densityDpi;
//                int width = (int) ((densityDpi / 2.54) * 21);
//                int height = (int) ((densityDpi / 2.54) * 29.7);
//
//                ViewGroup.LayoutParams params = webview.getLayoutParams();
//                params.width = width;
//                params.height = height;
//                webview.setLayoutParams(params);
//                Log.e("xiaoxin", "onPageFinished: " );
//                super.onPageFinished(webview, url);
//            }
//        });
//
//        int densityDpi = getResources().getDisplayMetrics().densityDpi;
//        int width = (int) ((densityDpi / 2.54) * 21);
//        int height = (int) ((densityDpi / 2.54) * 29.7);
//
//        ViewGroup.LayoutParams params = webview.getLayoutParams();
//        params.width = width;
//        params.height = height;
//        webview.setLayoutParams(params);
//        webview.addJavascriptInterface(this, "android");
//        scl90List = NovaApplication.fdbmanger.findAllByWhere(SBCL_DATA_NEW.class,
//                strWhere + " AND CL_TYPE = '" + DeviceConstant.SCL90 + "' ORDER BY CL_TIME DESC");
//
//        if (scl90List == null || scl90List.size() <= 0) {
//            webview.setVisibility(View.GONE);
//        } else {
//            webview.setVisibility(View.VISIBLE);
//            String data = scl90List.get(0).getCL_VALUE();
//            webview.loadUrl("javascript:initData(" + data + ")");
//
//            new Handler().postDelayed(new Runnable() {
//                @Override
//                public void run() {
//                    webview.loadUrl("javascript:initData(" + data + ")");
//                }
//            }, 1500);
//        }
//    }
//
//    private void saveScl90Report() {
//        FileUtils.isPathExist();
//
//        String filePath = FileUtils.PATH_ROOT
//                + NovaApplication.getUserInfo().getCUSTOMERNAME()
//                + "_2"
////                + TimeUtils.date2String(new Date(),"yyyy-MM-dd HH:mm:ss")
//                + ".png";
//
//        Bitmap oldBitmap = createScl90Bitmap();
//        int width = oldBitmap.getWidth();
//        int height = oldBitmap.getHeight();
//
//        int textSize = 25;
//        String text = "- 第二页 -";
//        int textWidth = text.length() * textSize;
//        float x = (width / 2f) - (textWidth / 2);
//        float y = height -90f;
//
//        Bitmap bitmap = ImageUtils.addTextWatermark(oldBitmap, text, textSize, Color.BLACK, x, y);
//        ImageUtils.save(bitmap, filePath, Bitmap.CompressFormat.PNG);
//        // 通知相册刷新文件
//        File file = new File(filePath);
//        MediaStore.Images.Media.insertImage(getContentResolver(),
//                BitmapFactory.decodeFile(file.getAbsolutePath()), file.getName(), null);
//        try {
//            Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
//            Uri uri = Uri.fromFile(file);
//            intent.setData(uri);
//            sendBroadcast(intent);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    private Bitmap createScl90Bitmap() {
//        int densityDpi = getResources().getDisplayMetrics().densityDpi;
//        int width = (int) ((densityDpi / 2.54) * 21);
//        int height = (int) ((densityDpi / 2.54) * 29.7);
//        webview.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
//                View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
//        webview.layout(0, 0, webview.getMeasuredWidth(), webview.getMeasuredHeight());
//
//        Bitmap bitmap = Bitmap.createBitmap(
//                webview.getMeasuredWidth(),
//                webview.getMeasuredHeight(),
//                Bitmap.Config.ARGB_8888);
//        Canvas canvas = new Canvas(bitmap);
//        webview.draw(canvas);
//        return Bitmap.createScaledBitmap(bitmap, width, height, true);
//    }
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        if (webview != null) {
//            webview.destroy();
//        }
//    }
//}
//
